import request from '@/utils/request'

// 查询paper列表
export function listPaper(query) {
  return request({
    url: '/paper/paper/list',
    method: 'get',
    params: query
  })
}
// 试卷详情试题
export function getTk(query) {
  return request({
    url: '/paper/paper/getTk',
    method: 'get',
    params: query
  })
}

export function TypeNums(query) {
  return request({
    url: '/paper/TypeNums/list',
    method: 'get',
    params: query
  })
}
// 自动组卷
export function zujuan(paper) {
  return request({
    url: '/paper/paper/zujuan',
    method: 'post',
    params: paper
  })
}
// 查询题数
export function tkNums(query) {
  return request({
    url: '/tk/tk/tkNums',
    method: 'get',
    params: query
  })
}
// 查询paper详细
export function getPaper(paperId) {
  return request({
    url: '/paper/paper/' + paperId,
    method: 'get'
  })
}

// 新增paper
export function addPaper(data) {
  return request({
    url: '/paper/paper',
    method: 'post',
    data: data
  })
}

// 修改paper
export function updatePaper(data) {
  return request({
    url: '/paper/paper',
    method: 'put',
    data: data
  })
}

// 删除paper
export function delPaper(paperId) {
  return request({
    url: '/paper/paper/' + paperId,
    method: 'delete'
  })
}

// 导出paper
export function exportPaper(query) {
  return request({
    url: '/paper/paper/export',
    method: 'get',
    params: query
  })
}